﻿using System;

namespace EduFormManager.Models.Log
{
    public class Log : Entity
    {
        public Log()
        {
            this.DateTime = DateTime.Now;
        }
        public virtual DateTime DateTime { get; set; }
        public virtual DateTime Date
        {
            get
            {
                return this.DateTime.Date;
            }
        }
        public virtual TimeSpan Time
        {
            get
            {
                return this.DateTime.TimeOfDay;
            }
        }

        public virtual LogAction Action { get; set; }
        public virtual EduOrg EduOrg { get; set; }
        
        public override String ToString() {
            return String.Format("{0} {1}", this.DateTime, this.Action);
        }
    }
}
